#pragma once

#include "Module.h"
#include "Defines.h"
#include "Settings.h"

class Module;
class ModuleScheduler;

class Engine
{
public:
	Engine();
	Engine(const std::string& settingsFilename);
	~Engine(void);

	bool Execute(Module* module);
	bool Run(Module* module);
	bool Manage(ModuleScheduler* scheduler);
	inline bool LoadSettings(const std::string& settingsFilename) { m_settings.Load(settingsFilename); }
	//inline void SetModule(Module& module) { m_module = &module; }
	inline void SetFpsUpdateTime(uint16 frames) { m_frameTime = 1000/frames; }
	inline const Settings* GetSettings() const { return &m_settings; }
private:
	//Module* m_module;
	sf::RenderWindow window;	//TODO: move settings in m_settings
	uint16 m_diff;
	uint16 m_frameTime;			//TODO: move this to settings ?
	Settings m_settings;

};
